package qsc.algorithm.DFS;

/**
 * @auther QiuShangcheng
 * @create 2021/4/30
 */
public class Client {
    public static void main(String[] args) {
        char[] vertex = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'};
        int edgeNum = vertex.length - 1;
        int[][] matrix = new int[vertex.length][vertex.length];
        matrix[0] = new int[]{0, 1, 1, 0, 0, 0, 0, 0};
        matrix[1] = new int[]{1, 0, 0, 1, 1, 0, 0, 0};
        matrix[2] = new int[]{1, 0, 0, 0, 0, 1, 1, 0};
        matrix[3] = new int[]{0, 1, 0, 0, 0, 0, 0, 1};
        matrix[4] = new int[]{0, 1, 0, 0, 0, 0, 0, 1};
        matrix[5] = new int[]{0, 0, 1, 0, 0, 0, 1, 0};
        matrix[6] = new int[]{0, 0, 1, 0, 0, 1, 0, 0};
        matrix[7] = new int[]{0, 0, 0, 1, 1, 0, 0, 0};
        Graph graph = new Graph(vertex, matrix, edgeNum);
        System.out.printf("DFS: ");
        Dfs.dfs(graph,0);

    }
}
